package com.zhang.superAiHospital;

import com.zhang.superAiHospital.utils.MD5Util;
import org.apache.commons.lang3.StringUtils;

/**
 * @author zsj
 * @description
 * @createDate 2025/11/18 17:22
 * @Entity com.zhang.test.html.entity.
 */
public class MD5Demo {

    public static void main(String[] args) {
        // 验证密码处理：
        String salt = "gcwle67b09dyjres";
        String oriPwd = "..aaAA147";
        String dbPwd = "19DEED586F76A0F9391CFE0F9EF90F78";
        // MD5后再加盐计算MD5
        String pwd = MD5Util.md5(MD5Util.md5(oriPwd) + salt);
        System.out.println(pwd);
        if (StringUtils.equals(pwd, dbPwd)){
            System.out.println("密码正确");
        }
    }
}
